<nz-modal nzWidth='420' nzTitle="修改密码" [nzMaskClosable]='false' [nzFooter]="null" [(nzVisible)]="modify.isEditVisible"
    (nzOnCancel)="closeModify()">
    <form nz-form [nzLayout]="'inline'">
        <div nz-row [nzGutter]="24">
            <div nz-col [nzSpan]="24">
                <nz-form-item>
                    <nz-form-label nzRequired class="form-label">旧密码</nz-form-label>
                    <nz-form-control class="form-control" [nzValidateStatus]="op.invalid?'error':'success'"
                        nzHasFeedback>
                        <input nz-input type="password" required [(ngModel)]="modify.op" name="op" #op="ngModel">
                    </nz-form-control>
                </nz-form-item>
            </div>

        </div>
        <div nz-row [nzGutter]="24">
            <div nz-col [nzSpan]="24">
                <nz-form-item>
                    <nz-form-label nzRequired class="form-label">新密码</nz-form-label>
                    <nz-form-control class="form-control" [nzValidateStatus]="np.invalid?'error':'success'"
                        nzHasFeedback>
                        <input nz-input type="password" required [(ngModel)]="modify.np" (change)="checkPwd()" name="np" #np="ngModel">
                    </nz-form-control>
                </nz-form-item>
            </div>
        </div>
        <div nz-row [nzGutter]="24">
            <div nz-col [nzSpan]="24">
                <nz-form-item>
                    <nz-form-label nzRequired class="form-label">确认密码</nz-form-label>
                    <nz-form-control class="form-control" [nzValidateStatus]="!modify.checkPwd?'error':'success'"
                        nzHasFeedback>
                        <input nz-input type="password" required [(ngModel)]="modify.qnp" (change)="checkPwd()" name="qnp"
                            #qnp="ngModel">
                        <nz-form-explain *ngIf="!modify.checkPwd">密码不一致</nz-form-explain>
                    </nz-form-control>
                </nz-form-item>
            </div>
        </div>
        <div nz-row [nzGutter]="24">
            <div nz-col [nzSpan]="24" class="form-button-align">
                <button nz-button nzType="default" (click)="closeModify()" class="form-button">取消</button>
                <button nz-button nzType="primary" [disabled]='op.invalid || np.invalid || !modify.checkPwd'
                    (click)="savePassword()" [nzLoading]="modify.isSaveing">确认修改</button>
            </div>
        </div>
    </form>
</nz-modal>